1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method which rasterize text and graphic data or renders natural image data such as photos and the like.
2. Description of the Related Art
Color data which is handled in a color printer or the like that prints graphic data or image data is given as RGB values designated by a color mode or command in the case of graphic data, and in an RGB dot-sequential or RGB frame-sequential format in the case of image data. A color space used to handle color data is not limited to RGB, and a YMC color space unique to a color printer (depending on ink properties), an XYZ color space defined by the CIE, or the like may be used.
In any case, upon execution of printing inside the color printer, input color data undergoes color reproduction processing (e.g., conversion from RGB to YMCK) corresponding to a color space defined in the color printer, thus making an actual printout.
In general, if the color printer considers color matching with color data to be handled by another device, one reference color space is defined to execute color correction that matches illuminant (color) characteristics with the other device. The other device includes, e.g., a color scanner or a color display such as a CRT or the like.
In this case, the color printer executes its internal color processing in correspondence with the reference color space. For example, the color printer can faithfully reproduce an image to be displayed on the color printer even when it outputs that image.
For example, in order to handle identical color data by devices such as a color scanner, color display, color printer, and the like, a reference color space, i.e., a device-independent color space is defined to convert color data onto each device-dependent color space using color space conversion processing corresponding to each device. With this conversion, color matching can be implemented between devices.
In practice, since respective devices have different color reproduction ranges due to their essential physical characteristics, it is difficult to attain colorimetric matches. However, in general, color correction which minimizes a color difference using a color difference formula represented by CIE1976 L*a*b* or the like has been proposed.
In a method of evaluating whether or not two colors expressed on different media like on a screen in the case of a color display and on a print sheet in the case of a color printer are equal to each other, many color difference formulas have been proposed. However, there is no absolutely established color difference formula, and most of these formulas are selectively used depending on their use purposes.
At the same time, there are some color reproduction methods, which are selectively used depending on their purposes. In consideration of the aforementioned color matching, different evaluation methods must inevitably be used depending on the purpose of the color reproduction. Especially, in a color printer, its internal color reproduction method becomes an important factor that influences the image quality of printed materials to be output.
In general, as described above, an attempt has been made to apply correction that minimizes color difference using a CIE1976 L*a*b* color difference formula or the like. This method is effective when a color printer performs color reproduction of color data scanned by a color scanner. This is because the source medium is a reflective document (colors reproduced on a paper sheet), and it is relatively easy to reproduce such color data using inks of a printing apparatus. Since the reflective document and the color printer have basically the same physical color development schemes, color reproduction is easy to achieve compared to other media although there are problems of different ink properties and densities (gray balances).
However, illuminant colors on the screen of a color display have physical properties themselves different from those of the reflective document, and the color reproducibility that can be attained using a general color difference formula is limited. When an image to be output on such media is a natural image, color reproduction, so-called preferred matching, is often used. The preferred matching aims at achievement of preferred color reproduction for some important colors (e.g., human flesh color and the like) of the image apart from the viewpoint as to whether or not color matching between the reproduced image and original image is attained.
However, upon handling data such as a natural image, such color reproduction is effective. However, upon handling data such as a computer graphics (CG) image, color reproduction processing with disregard to color matching poses a problem.
Hence, if the color reproduction processing can be changed in correspondence with data to be processed, the aforementioned problems can be solved. Therefore, by selecting the color reproduction processing corresponding to data to be handled, a multi-color printing apparatus which can print out data with better image quality can be provided.
FIG. 1 is a block diagram showing principal processing associated with color processing in a conventional printer. As shown in FIG. 1, an input unit 101 temporarily stores input data, and sends that data to a data analyzer 102. The data analyzer 102 analyzes whether the input data is image data or CG data. More specifically, the data analyzer 102 recognizes the data format of the input data, and determines that the input data is image data if respective pixels have a given pixel size, and their RGB values line up in the dot-sequential format. On the other hand, if data represents the type of graphic, and the coordinate values, RGB data of color designated values, and the like line up in a format that matches its processing system, the data analyzer 102 determines that the input data is CG data.
The input data branches to a rasterize system suited to its processing based on the analysis result of the data analyzer 102. That is, if the analysis result of the data analyzer 102 indicates image data, the data analyzer 102 sends the input data to an image rasterize system 103. The image rasterize system 103 converts the input data into YMC data with reference to a color conversion processor 104 to rasterize it to rendering data, and renders the rendering data on a page buffer 107.
If the analysis result of the data analyzer 102 indicates CG data, the data analyzer 102 sends the input data to a CG rasterize system 105. The CG rasterize system 105 converts the input data into YMC data with reference to a color conversion processor 106 to rasterize it to rendering data, and renders the rendering data on the page buffer 107.
By contrast, SVG (Scalable Vector Graphic) objects that attach importance to display of graphic designs on a monitor include transparent graphics and gradation graphics. The transparent graphics and gradation graphics will be described in detail below with reference to the drawings. The transparent graphics will be described first.
FIG. 2 is a view for explaining the composition processing for compositing two graphic data. In general, a color overlapping part between images to be rendered can undergo arithmetic processing according to an arbitrary color mixing formula. In this example, assume that two rectangular objects 210 and 220 are input as images, one rectangular object 210 has α_CG1 as a transparent and composition attribute value, and the other rectangular object 220 has α_CG2 as transparent and composition attribute value. Since the transparent and composition attribute values of each graphic data are set for respective pixels which form the image, composite pixels can be calculated for respective pixels upon composition.
Since this overlapping part 242 and other parts 241 and 243 must undergo different types of color matching processing, decomposition processing into regions 231 to 233 is appropriately executed, as shown in FIG. 7. Such composition processing using the “transparent and composition attribute values” is often called “α blend”.
A method of applying color matching to objects (graphics) to which α blend is to be applied will be described below. In general, the following two methods are used.
As the first method, a case will be described below wherein color matching processing (gamut mapping) is executed prior to α blend, as shown in FIG. 3. A PDL (page description language) job includes information of respective graphics (objects) required to form a print page. In general, an arbitrary color space can be independently designated for each graphic. For example, assume that color space A of a given specification (for example, to be referred to as A-RGB color space hereinafter) is designated for the rectangular object 210 shown in FIG. 2, and color space B of another specification (likewise, to be referred to as B-RGB color space hereinafter) is designated for another rectangular object 220.
A device used to print the objects in the system is printer A, and an input color space to printer A is defined as an RGB color space (i.e., a device RGB color space).
Upon executing color conversion from a device-independent color space (e.g., XYZ, Lab, or the like) into a device color space, an ICC profile of printer A (e.g., conversion from XYZ into device RGB) is used.
The difference between the color spaces of the two rectangular objects shown in FIG. 2 can be adjusted to one color space (in this case, the device color space) using the ICC profile of printer A.
More specifically, for the rectangular object 210, the A-RGB color space is converted into the XYZ color space, which is then converted into the device color space of printer A using the ICC profile of printer A. At this time, color space compression (gamut mapping+color conversion) suited to the gamut of the printer device is executed. The same processing applies to the rectangular object 220 as in the rectangular object 210 to obtain device RGB values.
These conversions can adjust the color spaces of the two rectangular objects to be composited to one color space. The two objects undergo the composition processing on the same color space, i.e., the device RGB color space. The printer receives device RGB color space values after composition of the objects, and internally converts the device RGB color space into a printer color space CMYK, thus executing printout processing.
As the second method, a case will be described below wherein after the composition processing of objects (graphics) to which α blend is applied, color matching processing (gamut mapping) onto the device color space is executed. In this case, assume that as a PDL script or the definition of the system, a rendering color space is defined (the definition in this case is broad, e.g., a color space used to make operations such as composition and the like is also referred to as the rendering color space). Also, assume that as the rendering color space, a color space defined based on the specification of a display or the like is designated in place of a color space that defines the gamut of the printer (for example, a standard color space sRGB or the like).
As described above, the PDL (page description language) job includes information of respective graphics (objects) required to form a print page. In general, arbitrary color spaces can be independently designated for respective graphics.
Assume that color space A of a given specification (for example, to be referred to as A-RGB color space hereinafter) is designated for the rectangular object 210 shown in FIG. 2, and color space B of another specification (likewise, to be referred to as B-RGB color space hereinafter) is designated for another rectangular object 220.
As shown in FIG. 4, color conversion from the respective color spaces into a rendering color space is executed. In this case, if an sRGB color space is designated as the rendering color space, since no color space compression is required, color space conversion (linear conversion that influences a white point, chromaticity, γ, or the like) is simply executed. Next, the two rectangular objects are converted onto an identical color space (rendering color space), and then undergo composition processing. After that, the rendering color space is converted into a device color space (device RGB color space). At this time, the device color space undergoes color space compression (gamut mapping+color conversion) since the rendering color space and device color space have different gamuts.
The printer receives the device RGB color space values after composition of the respective objects, and internally converts this device RGB color space into a printer color space CMYK, thus executing printout processing.
Note that the aforementioned two types of methods (FIGS. 3 and 4) will be compared, and which method is to be preferably adopted will be examined. Assume that the operation of the composition processing is specified by the PDL. Under this assumption, a case will be examined below wherein the rendering result of the PDL job is to be output to a display or printer.
As the image processing, when the composition processing is executed on one rendering color space, and that composition result is supplied to each device, it is naturally assumed that the rendering color space is converted into the color space of that device. The composition processing is a kind of arithmetic operation, and the result of the composition processing differs if the composition processing is executed on different color spaces. Composition processing executed after conversion to the color space of the device results in an adverse influence on the processing.
Generally considered, the second method (FIG. 4), i.e., the method of performing color space compression to the device color space after the composition processing is preferable.
Next, a case will be explained below wherein an object includes a gradation, and processing for that gradation is executed. Note that “gradation” means that a graphic, i.e., some points of a region like a rectangle are defined, and the colors of end points are defined at a plurality of points. In this graphic, any intermediate color value is expressed by a change from one end point to another end point.
FIGS. 5A and 5B are views for explaining gradation processing. Upon applying the color matching processing to this gradation graphic, the following problem may often occur due to quantization errors produced by calculations. FIG. 5A shows a gradation object, and FIG. 5B schematically shows interpolation arithmetic processing using an eight-point interpolation method. This interpolation processing sequentially drops the number of dimensions, and finally obtains an interpolation result.
For example, a gradation object which changes from red to black from a start point to an end point will be examined. This color conversion must be done in accordance with a position Vi on a rendering line, as shown in FIG. 5B. At this time, if a change (v1−v2) in rendering position is smaller than a moving distance (x2−x1), i.e., the value (v1−v2) is relatively low, the color conversion result often does not have a desired value due to quantization errors by calculations.
This problem will be explained using FIGS. 6A and 6B, and this is the case wherein after the gradation object is rasterized into pixels on the RGB color space, respective RGB pixels are converted into CMYK values by color matching processing. CMYK pixel values suffer from the influence of quantization errors due to the color matching processing. That is, even when a change on the CMYK color space side must be a monotonic increase, it suffers quantization errors and often does not become a monotonic increase, as shown in FIG. 6A.
To solve this problem, for example, the color matching processing may be executed and color change values in the gradation may be interpolated on the device color space based on the color matching results at control points of the gradation.
A description will be given using FIG. 6B. That is, this is the case that the color matching processing is applied to only the end points of a gradation object, and intermediate pixels are then generated during CMYK rendering processing. If an image is formed on the CMYK color space under the precondition of the gradation, it can be formed while meeting a monotonic increase condition.
Hence, generally considered, in the case of the gradation, the method of FIG. 6B, i.e., the method of performing color space compression of only end points onto the device color space, and then generating intermediate pixels on the device color space is preferable.
In this way, when objects include α blend, processing is preferably done on the RGB color space (rendering color space); when objects include gradation, it is preferably done on the device CMYK color space (device color space). However, the conventional printing system does not consider this point.
As described, above, if only one method is simply adopted, not all print requests are satisfied. There is room for consideration of an apparatus arrangement for implementing a variety of processes, e.g., when high-speed printing is to be executed, and when a job is processed using multi-threads, and only the RGB color space is to be used as a rendering color space.